const app = getApp()
Page({
  data: {
    Number:0,
    Sum:0,
    CorrectPercent:0.0
  },

  //加载答题传过来的数据
  onLoad: function (options) {
    this.setData({
      Number: options.Number,
      Sum:options.Sum,
      CorrectPercent: ((options.Sum-options.Number)/options.Sum).toFixed(4)
    })
    
  },
　　
　　//跳转错题回顾页
  RebackWrong:function(){
      wx.redirectTo({
        url: '../Review_wrong/Review_wrong',
      })
  },
　　
  //跳转时清空页面
  Initialize:function(){
    app.globalData.WrongQuestion = []
    app.globalData.WrongAnswer = []
    app.globalData.WrongChoose = []
    app.globalData.Correct = []
  },
　　
　　//跳回首页
  comeBack: function () {
    this.Initialize()
    wx.redirectTo({
      url: '../index/index',
    })
  }
})
